package com.UMLife.me.model;

import javax.microedition.io.HttpConnection;

public class ForgetPswModel
{
        private Communication c = null;
	    String msg="";
	    String respone="";
	    
	    /***
	     * 忘记密码
	     * @param name
	     * @param mail
	     * @param phone
	     * @param newPsw
	     * @param confirmPsw
	     * @return
	     */
	    public boolean forgetPsw(String cellphone,String email,String password )
	    {   //TODO
	    	msg="2"+"|"+cellphone+"|"+email+"|"+password;
	    	c=new Communication();
	    	Thread thread=new Thread(c);
	    	c.Setmsg(msg);
	        c.SetNb(1);
	    	thread.start();
	    	try {
				thread.join();
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	    	respone=c.Getrespone1();
	    	if(respone.equals("1")) return true;
	    	else return false;
	    }
}
